﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class ProductConsultationInfoConfig : EntityTypeConfiguration<ProductConsultationInfo>
    {
        public ProductConsultationInfoConfig()
        {
            ToTable("Himall_ProductConsultations");
            Property(item => item.ShopName).HasColumnType("varchar").HasMaxLength(200);
            Property(item => item.UserName).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.Email).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.ConsultationContent).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.ReplyContent).HasColumnType("varchar").HasMaxLength(1000);
         
            HasRequired(x => x.ProductInfo).WithMany(x => x.ProductConsultationInfo).HasForeignKey(x => x.ProductId);
        }
    }
}
